import request from '@/utils/request'

// 查询基线列表
export function listBaseline(query) {
  return request({
    url: '/system/baseline/list',
    method: 'get',
    params: query
  })
}

// 历史曲线列表
export function histroyList(query) {
  return request({
    url: '/system/baselinehistory/list',
    method: 'get',
    params: query
  })
}

// 查询基线详细
export function getBaseline(id) {
  return request({
    url: '/system/baseline/getInfo?id=' + id,
    method: 'get'
  })
}

// 查询历史详细
export function getHistoryline(id) {
  return request({
    url: '/system/baselinehistory/getInfo?id=' + id,
    method: 'get'
  })
}

// 新增基线
export function addBaseline(data) {
  return request({
    url: '/system/baseline/add',
    method: 'post',
    data: data
  })
}

// 编辑基线
export function updateBaseline(data) {
  return request({
    url: '/system/baseline/edit',
    method: 'post',
    data: data
  })
}

// 删除基线
export function delBaseline(id) {
  return request({
    url: '/system/baseline/remove?ids=' + id,
    method: 'post'
  })
}

// 获取基线生成状态
export function getApiBaselineStatus() {
  return request({
    url: '/system/baseline/getApiBaselineStatus',
    method: 'get',
    params: {}
  })
}

// 批量绑定阈值
export function editbyapl(data) {
  return request({
    url: '/system/baseline/editbyapl',
    method: 'post',
    data: data
  })
}

